<template>
	<view @click="open" class="ire">
		退出
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		created() {

		},
		methods: {
			open() {
				this.$confirm('确认退出?', '提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					uni.clearStorageSync();
					uni.reLaunch({
						url: '../login/login'
					})
					this.$message({
						type: 'success',
						message: '退出成功!'
					});
				}).catch(() => {

				});
			}
		}
	}
</script>

<style scoped>
	.ire {
		color: #fff;
		font-size: 20px;
		align-self: center;
		position: absolute;
		right: 153px;
		cursor: pointer;
	}
</style>
